import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

import Layout from "@/layout/index";
const routes = [
  {
    path: "/",
    name: "login",
    component: () => import("@/views/login/login.vue"),
  },
  {
    path: "/home",
    name: "Home",
    component: Layout,
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import("@/views/home/home/index.vue"),
      },
    ],
  },
  {
    path: "/clothesDetail",
    name: "clothesDetail",
    component: Layout,
    children: [
      {
        path: "workUniformInventoryRecord",
        name: "workUniformInventoryRecord",
        component: () => import("@/views/clothesDetail/workUniformInventoryRecord/index.vue"),
      },
      {
        path: "workUniformUsageRecord",
        name: "workUniformUsageRecord",
        component: () => import("@/views/clothesDetail/workUniformUsageRecord/index.vue"),
      },
      {
        path: "workUniformReturnRecord",
        name: "workUniformReturnRecord",
        component: () => import("@/views/clothesDetail/workUniformReturnRecord/index.vue"),
      },
      {
        path: "workUniformRecycleRecord",
        name: "workUniformRecycleRecord",
        component: () => import("@/views/clothesDetail/workUniformRecycleRecord/index.vue"),
      },
      {
        path: "clothesInventoryRecord",
        name: "clothesInventoryRecord",
        component: () => import("@/views/clothesDetail/clothesInventoryRecord/index.vue"),
      },
      {
        path: "clothesUsageRecord",
        name: "clothesUsageRecord",
        component: () => import("@/views/clothesDetail/clothesUsageRecord/index.vue"),
      },
      {
        path: "clothesReturnRecord",
        name: "clothesReturnRecord",
        component: () => import("@/views/clothesDetail/clothesReturnRecord/index.vue"),
      },
      {
        path: "clotheRecycleRecord",
        name: "clotheRecycleRecord",
        component: () => import("@/views/clothesDetail/clotheRecycleRecord/index.vue"),
      },
      {
        path: "dirtyOutboundRecord",
        name: "dirtyOutboundRecord",
        component: () => import("@/views/clothesDetail/dirtyOutboundRecord/index.vue"),
      },
      {
        path: "cleanInboundRecord",
        name: "cleanInboundRecord",
        component: () => import("@/views/clothesDetail/cleanInboundRecord/index.vue"),
      },
      {
        path: "suspectedLostFabric",
        name: "suspectedLostFabric",
        component: () => import("@/views/clothesDetail/suspectedLostFabric/index.vue"),
      },
    ],
  },
  {
    path: "/clothes",
    name: "Clothes",
    component: Layout,
    children: [
      {
        path: "clothesName",
        name: "clothesName",
        component: () => import("@/views/clothes/clothesName/index.vue"),
      },
      {
        path: "sizeInfo",
        name: "sizeInfo",
        component: () => import("@/views/clothes/sizeInfo/index.vue"),
      },
      {
        path: "clothesInfo",
        name: "clothesInfo",
        component: () => import("@/views/clothes/clothesInfo/index.vue"),
      },
      // {
      //   path: "clothesDetails",
      //   name: "clothesDetails",
      //   component: () => import("@/views/clothes/clothesDetails/index.vue"),
      // },
      // {
      //   path: "clothesStatistics",
      //   name: "clothesStatistics",
      //   component: () => import("@/views/clothes/clothesStatistics/index.vue"),
      // },
      // {
      //   path: "properties",
      //   name: "Properties",
      //   component: () => import("@/views/clothes/properties/index.vue"),
      // },
      {
        path: "suit",
        name: "Suit",
        component: () => import("@/views/clothes/suit/index.vue"),
      },
      {
        path: "fabric",
        name: "Fabric",
        component: () => import("@/views/clothes/fabric/index.vue"),
      },
    ],
  },
  {
    path: "/basic",
    name: "Basic",
    component: Layout,
    children: [
      {
        path: "region",
        name: "region",
        component: () => import("@/views/basic/region/index.vue"),
      },
      {
        path: "department",
        name: "department",
        component: () => import("@/views/basic/department/index.vue"),
      },
      {
        path: "role",
        name: "role",
        component: () => import("@/views/basic/role/index.vue"),
      },
      {
        path: "staff",
        name: "staff",
        component: () => import("@/views/basic/staff/index.vue"),
      },
    ],
  },
  {
    path: "/statistics",
    name: "Statistics",
    component: Layout,
    children: [
      {
        path: "workUniformDepartment",
        name: "workUniformDepartment",
        component: () => import("@/views/statistics/workUniformDepartment/index.vue"),
      },
      {
        path: "workUniformEquipment",
        name: "workUniformEquipment",
        component: () => import("@/views/statistics/workUniformEquipment/index.vue"),
      },
      {
        path: "clothesDepartment",
        name: "clothesDepartment",
        component: () => import("@/views/statistics/clothesDepartment/index.vue"),
      },
      {
        path: "reportedRepairInventory",
        name: "reportedRepairInventory",
        component: () => import("@/views/statistics/reportedRepairInventory/index.vue"),
      },
      {
        path: "breakageRepairInventory",
        name: "breakageRepairInventory",
        component: () => import("@/views/statistics/breakageRepairInventory/index.vue"),
      },
    ],
  },
  {
    path: "/system",
    name: "System",
    component: Layout,
    children: [
      {
        path: "device",
        name: "Device",
        component: () => import("@/views/system/device/index.vue"),
      },
      {
        path: "sysRole",
        name: "SysRole",
        component: () => import("@/views/system/sysRole/index.vue"),
      },
      {
        path: "sysUser",
        name: "SysUser",
        component: () => import("@/views/system/sysUser/index.vue"),
      },
      {
        path: "sysLog",
        name: "SysLog",
        component: () => import("@/views/system/sysLog/index.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  // mode: 'history',
  // base: process.env.BASE_URL,
  routes,
});

export default router;
